<template>
    <div class="express_dispatch">
            <el-radio-group v-model="current">
                <el-radio-button :label="tab.type" v-for="(tab,index) in navList" :key="index">
                    {{tab.name}} ({{tab.count}})
                </el-radio-button>
            </el-radio-group>
             <lar-table model="express.mission" canAdd="canAdd" class="border"></lar-table>
    </div>
</template>
<script>

    export default {
        props: {
            navList: {
                type: Object | Array,
                default: () => {
                    return []
                }
            }
        },
        components: {

        },
        data() {
            return {
                current: '-1'
            }
        },
        watch: {
            // navList: {
            //     handler(newValue) {
            //         this.current = newValue.total.type;
            //     }
            // },
            current: function (newValue) {
                // console.info('adfasdfadsfasdfadfasd', newValue);
                let data = {
                    missionStatus: {
                        value: newValue,
                        searchModel:"equal"
                    }
                };
                this.$store.commit('pipe', {'value': data, 'name': 'express.mission.table'});
            }
        },
        methods: {}
    }
</script>
<style lang="less">
   /*
   样式共用，修改谨慎
   */
    .express_dispatch {
        box-sizing: border-box;
        margin: 0 10px;
        background: #fff;
        .el-radio-button__orig-radio:checked + .el-radio-button__inner{
            background: #fff !important;
            box-sizing: border-box;
            font-weight: 400 !important;
            color: #009688 !important;
            border-color: #dcdfe6 !important;
            box-sizing: border-box !important;
            border-bottom:none !important;
            position: relative;
            top: 1px;
        }
        .el-radio-button, .el-radio-button__inner{
            height: 40px;
        }
        .el-radio-button__inner {
            padding: 12px 25px;
            border-radius:2px !important;
            border-bottom: none;
            border-color: rgba(238,238,238,1);
        }
    }
   @media screen and (max-width: 1198px) {
       .express_dispatch{
           .el-radio-button__inner{
               padding: 12px 10px !important;
               border-radius: 4px 4px 0  0  !important;
           }
       }

   }
</style>

